<#if !startVisitDate?has_content>
    <#assign startVisitDate=(.now?long-7*24*3600*1000)?number_to_date/>
</#if>
<@_visitSessionList sessionId=sessionId startVisitDate=startVisitDate endVisitDate=endVisitDate orderType=orderType pageIndex=pageNum pageSize=numPerPage>
<div class="pageHeader">
    <form class="pagerForm" autocomplete="off" onsubmit="return navTabSearch(this);" method="post">
        <#include "../include_page/parameters.html"/>
        <div class="searchBar">
            <ul class="searchContent">
                <li>
                    <label><@t.page 'visit.session'/>:</label>
                    <input type="text" name="sessionId" value="${sessionId!}" size="40"/>
                </li>
                <li>
                    <label><@t.page 'visit.visit_date'/>:</label>
                    <input type="text" name="startVisitDate" class="date" size="10" dateFmt="yyyy-MM-dd" maxDate="{%y}-%M-{%d}" value="${startVisitDate!}" />
                    <span>-</span>
                    <input type="text" name="endVisitDate" class="date" size="10" dateFmt="yyyy-MM-dd" maxDate="{%y}-%M-{%d+1}" value="${endVisitDate!}" />
                </li>
            </ul>
            <div class="subBar">
                <ul>
                    <li>
                        <button type="submit" class="buttonActive"><@t.page 'button.search'/></button>
                    </li>
                </ul>
            </div>
        </div>
    </form>
</div>
<div class="pageContent">
    <div class="panelBar">
        <ul class="toolBar">
        </ul>
    </div>
    <table class="table" width="100%" layoutH="92">
        <thead>
            <tr>
                <th><@t.page 'visit.session'/></th>
                <th orderField="lastVisitDate" class="<#if orderField?has_content&&'lastVisitDate'==orderField><#if 'asc'=orderType>asc<#else>desc</#if><#else>order</#if>"><@t.page 'visit.visit_date.last'/></th>
                <th><@t.page 'visit.visit_date.first'/></th>
                <th><@t.page 'visit.ip'/></th>
                <th>PV</th>
            </tr>
        </thead>
        <tbody>
            <#list page.list as a>
            <tr>
                <td><a href="visit/history.html?sessionId=${a.id.sessionId!}" target="navTab" rel="visit/history" icon="<i class='icon-bolt icon-large'></i>">${a.id.sessionId!}</a></td>
                <td>${a.lastVisitDate!}</td>
                <td>${a.firstVisitDate!}</td>
                <td class="center">${a.ip!}</td>
                <td class="center">${a.pv!}</td>
            </tr>
            </#list>
        </tbody>
    </table>
    <#include "../include_page/page.html"/>
</div>
</@_visitSessionList>